
#ifndef __USER_H_
#define __USER_H_
#include "MyString.h"

#define MAX_USERS 50

struct TelephoneInfo
{
    MyStr name;
    MyStr phone;
};

typedef struct TelephoneInfo user;

struct TelephoneBook
{
    user info[MAX_USERS];
    int size;
};

typedef struct TelephoneBook telephonebook;

void init_info(telephonebook *t);
void insert_user(telephonebook *t);
void output_user(telephonebook *t,int i);
user *find_user_name(telephonebook *t, MyStr *name);
void rm_info_by_name(telephonebook *t, MyStr *name);
void modify_info(telephonebook *t,user *u);

#endif